<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>


<script src="http://yui.m3958.com/3.6.0/build/yui/yui-min.js"></script>

<style type="text/css">
#newxyzcms-app-container {
	width: 90%;
	margin: auto;
}

.yui3-minimizableblock .yui3-widget-buttons{
	position: absolute;
	top: 0;
	right: 0;
	padding: 8px;
}

.yui3-minimizableblock .yui3-minimizableblock-button-close{
	background: transparent;
	filter: none;
	border: 0;
	-webkit-border-radius: 0;
	-moz-border-radius: 0;
	border-radius: 0;
	-webkit-box-shadow: none;
	-moz-box-shadow: none;
	box-shadow: none;
	width: 13px;
	height: 13px;
	padding: 0;
	overflow: hidden;
	vertical-align: top;
}

.yui3-minimizableblock .yui3-widget-hd,.yui3-minimizableblock .yui3-widget-ft{
	position: relative;
	min-height: 30px;
}

.yui3-minimizableblock .yui3-widget-ft{
	min-height: 45px;
}

.yui3-modelform-hidden{
	display:none;
}

.displaynone{
	display: none;
}
.minimizable-block-minimized{
	width: 29px;
	height: 29px;
}

/*
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/


</style>
</head>
<body class="yui3-skin-sam">
	<table>
		<tr>
			<td valign="middle" align="center"></td>
		</tr>
		<tr>
			<td></td>
		</tr>
	</table>

	<div id="newxyzcms-app-container">
		<div id="newxyzcms-app-links" style="margin-bottom: 6px;"></div>
		<div id="m3958-back-forward-c"><a href="#/" id="m3958-back-forward">&lt;&lt;返回前一页</a></div>
	<div id="newxyzcms-app"></div>
	</div>

<div id="panelContent">
    <div class="yui3-widget-hd">
        Showing an animated panel
    </div>
    <div class="yui3-widget-bd">
        <p>Making panels animate is easy with the "transition" module!</p>
    </div>
</div>


 <script type="text/javascript">
 
 YUI.GlobalConfig = {
         modules: {
             "message-panel-css": {
                 type: "css",
                 fullpath: "http://yui.m3958.com/m3958-modules/message-panel/assets/message-panel-css.css"
             },
             "minimizable-block-css":{
            	 type: "css",
            	 fullpath: "http://yui.m3958.com/m3958-modules/minimizable-block/assets/minimizable-block-css.css"
             },
             "newxyzcms" : {
            	 fullpath : "http://yui.m3958.com/m3958-modules/alone/newxyzcms.js"
             }
 		},
         groups: {
             m3958modules: {
             	filter : "RAW", 
                 base: '/m3958-modules/',
                 combine: true,
                 comboBase: 'http://yui.m3958.com/combo?',
                 comboSep: '&', 
                 root: '/m3958-modules/',
                 modules: {
                     "m3958-utils": {},
                     "model-form": {},
                     "message-panel": {
                    	 requires : ["message-panel-css"]
                     },
                     "model-form-with-btn": {},
                     "model-text-field": {},
                     "model-captcha-field": {},
                     "field-translator": {},
                     "model-multiple-select-field": {},
                     "m3958-codemirror-loader": {},
                     "model-codemirror-field":{},
                     "model-html-select-field": {},
                     "model-password-field":{},
                     "model-hidden-field":{},
                     "m3958-yui3g":{},
                     "modellist-extension":{},
                     "m3958-xinjian-model":{
                    	 requires : ["modellist-extension"]
                     },
                     "model-textarea-field":{},
                     "model-checkbox-field":{},
                     "crud-view-table":{},
                     "many-to-many-panel":{},
                     "captcha-image-panel":{},
                     "minimizable-block":{
                    	 requires : ["minimizable-block-css"]
                     },
                     "object-crud-view":{},
                     "m3958-static-utils" : {},
                     "validator-convertor":{
                    	 requires : ["m3958-static-utils"]
                     },
                     "home-view":{},
                     "message-box":{},
                     "newxyz-app-all" : {
                     	use : [
                     	       "m3958-utils",
   	                           "model-form",
   	                          "message-panel",
   	                          "model-form-with-btn",
   	                          "model-text-field",
   	                       	"model-codemirror-field",
   	                          "model-captcha-field",
   	                          "field-translator",
   	                          "model-multiple-select-field",
   	                          "model-html-select-field",
   	                          "model-password-field",
   	                          "model-textarea-field",
   	                       		"model-hidden-field",
   	                          "model-checkbox-field",
   	                       	"m3958-xinjian-model",
   	                       		"m3958-yui3g",
   	                          "crud-view-table",
   	                          "many-to-many-panel",
   	                          "captcha-image-panel",
   	                          "minimizable-block",
   	                          "object-crud-view",
   	                          "home-view",
   	                          "message-box",
   	                          "validator-convertor",
   	                          "minimizable-block-css"]
                     }
                 }
             }
         }
     };
 
	var m3958_classDescList = [{viewPath:'/xinjians*',viewName:'xinjianNewPage',name:'Xinjian',cname:'留言',
	                   		backController : 'xinjians',
	                   		fields : [{fieldName:'xjcatid',inputLabel:'xjcatid',valueType:'string',ftype:'hidden',initValue:92134,required:true,validators:[],position:1},
	                   		          {fieldName:'siteid',inputLabel:'siteid',valueType:'string',ftype:'hidden',initValue:92115,required:true,validators:[],position:1},
	                   		          {fieldName:'leixing',inputLabel:'类型',valueType:'string',ftype:'htmlSelect',required:true,validators:[],options:[{label:'咨询',value:'咨询'},{label:'投诉',value:'投诉'},{label:'其它',value:'其它'}],position:80,span:6},
	                   		          {fieldName:'title',inputLabel:'标题',valueType:'string',ftype:'text',required:true,validators:[{length:"[3..]"}],position:90,span:6,initValue:"zheli shi biaoti."},
	                   		          {fieldName:'xingming',inputLabel:'您的姓名',valueType:'string',ftype:'text',required:true,validators:[{length:"[1..]"}],position:5,span:12,initValue:"jianglibo"},
	                   		          {fieldName:'dianhua',inputLabel:'您的电话',valueType:'string',ftype:'text',required:true,validators:[{regex:/^[0-9-]{7,}$/}],position:10,initValue:"12345678"},
	                   		          {fieldName:'dizhi',inputLabel:'您的地址',valueType:'string',ftype:'text',required:false,validators:[{length:"[4..]"}],position:15},
	                   		          {fieldName:'email',inputLabel:'您的邮件',valueType:'string',ftype:'text',validators:[{email:true}],required:true,position:20,initValue:"abc@m3958.com"},
	                   		          {fieldName:'content',inputLabel:'留言内容',valueType:'string',ftype:'codemirror',required:true,validators:[{length:"[10..]"}],position:100,decoration:{cmMode:'htmlMixedMode',theme:'xq-dark'},initValue:"abc@m3958.comabc@m3958.comabc@m3958.comabc@m3958.comabc@m3958.com"},
	                   		          {fieldName:'captcha_answer',inputLabel:'验证码',valueType:'string',ftype:'captcha',required:true,validators:[{length:"[5..5]"}],position:110,initValue:'12345'}
	                   		          ]}];
  	
  	YUI({combine: true,
		comboBase: 'http://yui.m3958.com/combo?',
		root : '3.6.0/build/'}).use("cssgrids",'app','panel','overlay','newxyz-app-all','get','m3958-codemirror-loader',function(Y){
			Y.debugMode = true;

			Y.codeMirrorLoader = new Y.M3958.M3958CodemirrorLoader();
			
			var classDescription = m3958_classDescList[0];
			
			var	modelForm = new Y.M3958.ModelForm({classDescription:classDescription});
			
			var minimizableForm = new Y.M3958.MinimizableBlock({blockType:'form',modelForm:modelForm,width:800,
					buttons:{
						header: [{
				            name  : 'minimize',
				            label : 'X',
				            action: 'minimize',
				            classNames : ["yui3-minimizableblock-button-close"]
				        }],
				        footer : [{
						    name  : 'createBt',
						    label : '添加',
						    action : 'submitForm'
						},
						{
				            name  : 'cancelBt',
				            label : '取消',
				            action : 'cancelForm'
				        }]
					},
					headerContent:""
				});
				minimizableForm.render();
	
			
			/*
			Y.Get.js('/m3958-modules/alone/newxyzcms.js', function (err) {
			    if (err) {
			        Y.log('Error loading JS: ' + err[0].error, 'error');
			        return;
			    }
				createM3958App(Y,{classDescList:m3958_classDescList,initRoutePath:"/appgroups"});
			});
			*/
/*			
			 var   panel = new Y.Panel({
			        srcNode: '#panelContent',
			        width  : 330,
			        zIndex : 5,
			        modal  : false,
			        visible: true,
			        render : true
			    });

			*/
/*			    var overlay = new Y.Overlay({
			        srcNode:"#overlay",
			        width:"20em"
			    });
			    overlay.render();
*/
	});
 	</script>
</body>
</html>